-- GENERATED SPELL FOR [Winterskorn Elder] --


function spell0_23670(pUnit, Event) --@Earth Shield,n/a--
pUnit:FullCastSpellOnTarget(32734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23670', 628, 1)
end

function spell1_23670(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_23670', 3000, 1)
end

function spell2_23670(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23670', 3000, 1)
end

function Sorts_23670(pUnit, Event)
local choix_sorts_23670 = math.random(0, 2)
if choix_sorts_23670 == 0 then
pUnit:RegisterEvent('spell0_23670', 1, 1)
end
if choix_sorts_23670 == 1 then
pUnit:RegisterEvent('spell1_23670', 1, 1)
end
if choix_sorts_23670 == 2 then
pUnit:RegisterEvent('spell2_23670', 1, 1)
end
end

function mob23670_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23670', math.random(1500, 3000), 1)
end

function mob23670_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23670_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23670_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23670, 1, 'mob23670_Action')
RegisterUnitEvent(23670, 2, 'mob23670_Leave')
RegisterUnitEvent(23670, 3, 'mob23670_Kill')
RegisterUnitEvent(23670, 4, 'mob23670_Die')
